package com.billy.ohos.loadingstatusview.wrapability;

import com.billy.ohos.loadingstatusview.BaseAbility;
import ohos.aafwk.content.Intent;

/**
 * demo: loading and load success but empty
 *
 * @author billy.qi
 * @since 19/3/19 21:09
 */
public class GlobalEmptyAbility extends BaseAbility {

    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        setUIContent(contentLayout);
        startLoadData();
    }

    private void startLoadData() {
        showLoading();
        getUITaskDispatcher().delayDispatch(new Runnable() {
            @Override
            public void run() {
                showEmpty();
            }
        }, 2000);
    }

}
